package com.yueya.basic.news.subject.model;

import com.jfinal.aop.Duang;
import com.jfinal.kit.StrKit;
import com.jfinal.plugin.activerecord.Model;
import com.yueya.basic.news.subject.service.SubjectService;

public class Subject extends Model<Subject> {

	private static final long serialVersionUID = 1734394605001868058L;

	public static Subject dao = new Subject();

	public static SubjectService service = Duang.duang(SubjectService.class);

	public Subject findById(String id) {
		if (StrKit.isBlank(id))
			return null;
		String sql = "select * from t_subject where subject_id = ?";
		return Subject.dao.findFirst(sql, id);
	}
}
